<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    div{
      width: 100px;
      height: 500px;
      background: red;
    }
  </style>
</head>
<body>
  <!-- 
    slideDown()
      下拉出现
    slideUp()
      上升消失
    slideToggle()
      切换对应的状态
  -->
  <button>按钮</button>
  <hr>
  <div></div>
  <script src="../libs/jquery-1.12.4.js"></script>
  <script>
    $('button').on('click', function () {
      $('div').slideToggle(2000, function () {
        alert('动画结束')
      })
    })
  </script>
</body>
</html>